<?php
require_once ("main.class.php");
try {
    $token_path = __DIR__."/token.json";
    if (!is_file($token_path)) {
        file_put_contents($token_path, "[]");
    }
    $token = json_decode(file_get_contents($token_path),true);
    foreach ($token as $value) {
        $param = array(
            "token" => $value
        );
        $API = new HypergryphGachaAPI($param);
        $API->getFormatGachaData();
        $API->logger("","INFO");
    }
}catch (Exception $e){
    echo $e->getMessage();
    exit(1);
}
